package com.example.automanagement.mapper;

import com.example.automanagement.entity.AutoStatus;
import com.example.automanagement.entity.DriverStatus;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface DriverStatusMapper {
    @Insert("insert into driver_status(user_id, driver_status) values (#{userId},#{driverStatus})")
    void addDriverStatus(DriverStatus driverStatus);
    @Update("update driver_status set driver_status = '忙碌' where user_id = #{userId}")
    void updateDriverBusy(String userId);
    @Update("update driver_status set driver_status = '空闲' where user_id = #{userId}")
    void updateDriverFree(String userId);
    @Delete("delete from driver_status where user_id = #{userId}")
    void deleteDriverStatus(String userId);
}
